Updated for 2.6.1 by: The Tech Support Team, Pictorius Incorporated
Contents: Color Windows.pgs
Color Windows ReadMe
Floating Window XPrims
Floating Window XPrim Library
Needs Prograph Extensions:
The default configuration of your 'Prograph Extensions' folder, plus:
-Floating Window XPrims (included in this archive)
Needs Libraries to Compile:
Floating Window XPrim Library
SCLibrary 2.6
Library 2.6
Standard Methods That Were Modified:
Initial
Menu/Quit
New Classes:
CWindow
CScroll List
CScroll Text
CRadio Set
CCheck Box
CButton
New Methods:
Set Color - Fills in one element of a color table.
Color Control - Colors a control.
CWindow/Open
CScroll List/Open
CScroll Text/Open
CRadio Set/Open
CCheck Box/Open
CButton/Open
Description:
-----------
This set of classes allows you to color window parts and parts of Scroll List, Scroll Text, Radio Set, Check Box and Button items. The only parts supported are those included in the standard color table entries as documented in Inside Macintosh Volume V, chapters 11 and 12.
Colorable windows have five extra attributes: "content color", "frame color", "text color", "hilite color" and "title bar color". Colorable window items have four extra attributes: "frame color", "text color", "body color" and "thumb color". These attributes must contain RGB values such as { 0 0 0 } (black), { 65535 65535 65535 } (white ), etc. The default values for these attributes create standard black and white controls.
In Windows, the "content color" is the background color; the "text color" is the window title color (NOT the color of text items in the window); the "hilite color" also affects the title bar only.
For Scroll List and Scroll Text items, only the scrollbar is affected by these attributes. The "text color" is ignored for scrollbars, and the "thumb color" is ignored in all but scrollbars. The "frame color" affects the outline of the button, the square outline of the check box itself, or the round outline of the radio button. The "text color" affects the text displayed in the button, or the text displayed beside the check box or radio button. The "body color" fills in the outline of the button or the X inside the check box, or the circle that fills the radio button when it is selected.
IMPORTANT NOTE: Under System 7, where true grays are already used to fill in a number of the "parts" described above, setting some of these attributes will have little or no effect - e.g., the "body color" of a scrollbar. See Technical Note #298 for lots more details.
To change the color of a window item using the window editor: CMD-OPTION-SHIFT click on the item to show its attributes, scroll to the bottom of the attribute list and double-click on one of the "color" attributes, click the "Graphic" check box to bring up the Color Picker and choose your color. Since it is the "Open" methods which actually do the coloring, colors will not appear until you run your program. Also, /Open does not get called for windows in your "Active List", so you should call /Open explicitly for every window you want to open.